package cn.zucc.edu.madq.controller;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.zucc.edu.madq.service.ClubService;

@Controller
@RequestMapping("index")
public class IndexController {

	@Autowired
	private ClubService clubService;

	// 显示所有俱乐部
	@RequestMapping("")
	public ModelAndView index(HttpServletRequest request,
			HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("club", clubService.getClubById(1103));
		mav.setViewName("index");
		return mav;
	}
}
